<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>上官婉儿</title>
    <link rel="stylesheet" href="/component/ztree/css/demo.css" type="text/css">
    <link rel="stylesheet" href="/component/ztree/css/zTreeStyle/zTreeStyle.css" type="text/css">
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/font-awesome/css/font-awesome.css" rel="stylesheet">
    <link href="/css/animate.css" rel="stylesheet">
    <link href="/css/style.css" rel="stylesheet">
    <link href="/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/css/plugins/select2/select2.min.css" rel="stylesheet">
    <style type="text/css">
        li{
            font-size: 100%;
        }
        .select2-container--open .select2-dropdown {
            left:0;z-index:999999999;
        }
    </style>
</head>

<body>
<div id="wrapper">
    <#include "/layout/left.ftl">
    <div id="page-wrapper" class="gray-bg">
        <#include "/layout/header.ftl">
        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <button type="button" class="btn btn-primary" onclick="add()"><i class="fa fa-plus"></i>&nbsp;添加</button>
                            <button type="button" class="btn btn-danger" onclick="startDelete()"><i class="fa fa-times"></i>&nbsp;删除</button>
                            <button type="button" class="btn btn-info" id="refresh" onclick="startRefresh()"><i class="fa fa-refresh"></i>&nbsp;刷新</button>
                        </div>
                        <div class="ibox-content">
                            <ul id="treeDemo" class="ztree" style="margin-top: 0px;"></ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="footer">
            <#include "/layout/footer.ftl">
        </div>

    </div>
</div>

<!-- Mainly scripts -->
<script src="/js/jquery-3.1.1.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<!-- Custom and plugin javascript -->
<script src="/js/inspinia.js"></script>
<script src="/js/plugins/pace/pace.min.js"></script>
<!-- iCheck -->
<script src="/js/plugins/iCheck/icheck.min.js"></script>
<!-- Select2 -->
<script src="/js/plugins/select2/select2.full.min.js"></script>
<script src="/component/layer/layer.js"></script>
<script type="text/javascript" src="/component/ztree/js/jquery.ztree.core.js"></script>
<script type="text/javascript" src="/component/ztree/js/jquery.ztree.excheck.js"></script>
<script src="/custom/js/common/bzxgc-utils.js"></script>
<script src="/custom/js/common/global.js"></script>
<script src="/custom/js/common/list-ztree.js"></script>
<script src="/custom/js/common/ztree-utils.js"></script>
<script type="text/javascript">
    var url = '/menu';
    var listUrl = url + '/list';
    var addUrl = url + '/add';
    var updateUrl = url + '/update/';
    var ajaxSaveUrl = url + '/ajax/save';
    var ajaxDeleteUrl = url + '/ajax/delete';
    <!--
    var setting = {
        check: {
            enable: true
        },
        data: {
            simpleData: {
                enable: true
            }
        },
        callback: {
            onClick: zTreeOnClick
        }
    };

    var zNodes =${json};

    $(document).ready(function(){
        $.fn.zTree.init($("#treeDemo"), setting, zNodes);
    });

    function zTreeOnClick(event, treeId, treeNode) {
        update(treeNode.id)
    };
    //-->
</script>
</body>
</html>